﻿using System;
using System.Web;
using System.Web.Mvc;
using System.Collections.Generic;

using UncleBobWebService.Models;
//using UncleBobWebService.Database;
//using UncleBobWebService.ServiceRequester;
//using UncleBobApplicantWebService.ApplicantWebService;


namespace UncleBobApplicantWebService.Controllers
{
    public class ApplicantMainMenuController : Controller
    {
        //**************************************************
        //Display main menu view
        //**************************************************
        public ActionResult MainMenu()
        {
            return View(Session["User"] as RegisterModel);
        }

        //**************************************************
        //Form action handle
        //**************************************************
        [SessionExpiredFilter]
        public ActionResult FormAction(FormCollection collection)
        {
            if (collection["cmdSearch"] != null)
            {
                return RedirectToAction("ApplicantJobList", "ApplicantJobList");
            }
            else if (collection["cmdProfile"] != null)
            {
                return RedirectToAction("EditRegistration", "Register");
            }
            else if (collection["cmdView"] != null)
            {
                return RedirectToAction("Applications_Status_List", "ApplicationStatusList");
            }

            return RedirectToAction("Index", "Welcome");
        }
    }
}
